import csv
import math
import os
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
from statannotations.Annotator import Annotator
Clust=pd.read_csv('F:\\Microglia project\\Soft X-ray tomography\\2023\Analysis\\PCA_all_organelles_volumetric.csv')
#scaling data to pixel size
Clust['Cell Volume']=(Clust['Pixel size microns']**3)*(Clust['Cell Volume'])
Clust['Nucleus Volume']=(Clust['Pixel size microns']**3)*(Clust['Nucleus Volume'])
Clust['Cell Area ']=(Clust['Pixel size microns']**2)*(Clust['Cell Area '])
Clust['Nucleus Area ']=(Clust['Pixel size microns']**2)*(Clust['Nucleus Area '])
Clust['Mitochondria Volume']=(Clust['Pixel size microns']**3)*(Clust['Mitochondria Volume'])
Clust['Mitochondria Area']=(Clust['Pixel size microns']**2)*(Clust['Mitochondria Area'])
Clust['Endosome Volume']=(Clust['Pixel size ']**3)*(Clust['Endosome Volume'])
Clust['Endosome Area']=(Clust['Pixel size ']**2)*(Clust['Endosome Area'])
Clust['Lipid Volume']=(Clust['Pixel size ']**3)*(Clust['Lipid Volume'])
Clust['Lipid Area']=(Clust['Pixel size ']**3)*(Clust['Lipid Area'])
#mathematical parameters
#nucleus
Clust['Relative Nucleus Volume']=(Clust['Nucleus Volume']/Clust['Cell Volume'])*100
Clust['Relative Nucleus Area']=(Clust['Nucleus Area ']/Clust['Cell Area '])*100
Clust['Surface/Volume Cell Ratio']=Clust['Cell Area ']/Clust['Cell Volume']
Clust['Surface/Volume Nucleus Ratio']=Clust['Nucleus Area ']/Clust['Nucleus Volume']
#mitochondria
Clust['Relative Mitochondria Volume']=(Clust['Mitochondria Volume']/Clust['Cell Volume'])*100
Clust['Relative Mitochondria Area']=(Clust['Mitochondria Area']/Clust['Cell Area '])*100
Clust['Surface/Volume Mitochondria Ratio']=Clust['Mitochondria Area']/Clust['Mitochondria Volume']
#endosomes
Clust['Relative Endosome Volume']=(Clust['Endosome Volume']/Clust['Cell Volume'])*100
Clust['Relative Endosome Area']=(Clust['Endosome Area']/Clust['Cell Area '])*100
Clust['Surface/Volume Endosome Ratio']=Clust['Endosome Area']/Clust['Endosome Volume']
#lipids
Clust['Relative Lipid Volume']=(Clust['Lipid Volume']/Clust['Cell Volume'])*100
Clust['Relative Lipid Area']=(Clust['Lipid Area']/Clust['Cell Area '])*100
Clust['Surface/Volume Lipid Ratio']=Clust['Lipid Area']/Clust['Lipid Volume']
Clust.to_csv('F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Clust.csv', sep=';', header=True, index=False)
my_colors = ["#ffeda0", "#fa9fb5", "#c51b8a", "#9ecae1", "#3182bd"]
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Cell Volume'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Cell Volume'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Cell Volume'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Cell Volume,$\mu$m$^3$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Cell_Volume.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:6.100e-03 t=-3.007e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:2.140e-01 t=1.282e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:7.781e-01 t=2.851e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:1.044e-01 t=-1.697e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:1.307e-01 t=-1.567e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:1.248e-01 t=-1.590e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Cell Area '], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Cell Area '], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Cell Area '
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Cell Area,$\mu$m$^2$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Cell_Area.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:2.386e-02 t=-2.412e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:7.944e-01 t=-2.639e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:6.064e-01 t=5.224e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:7.494e-03 t=-2.959e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:4.190e-02 t=-2.155e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:8.962e-02 t=-1.769e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Cell LAC'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Cell LAC'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Cell LAC'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Cell LAC, $\mu$m$^{-1}$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Cell_LAC.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:3.257e-01 t=1.003e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:1.826e-01 t=-1.378e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:5.719e-01 t=-5.734e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:6.600e-01 t=-4.462e-01
M0_0 vs. M2_6h: t-test independent samples, P_val:3.699e-01 t=9.147e-01
M0_0 vs. M2_24h: t-test independent samples, P_val:8.424e-01 t=2.010e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Surface/Volume Cell Ratio'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Surface/Volume Cell Ratio'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Surface/Volume Cell Ratio'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Cell Area/Volume", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Cell_A_V.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:5.963e-02 t=1.977e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:1.031e-02 t=-2.818e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:6.166e-01 t=5.075e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:1.075e-01 t=-1.681e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:6.514e-01 t=-4.578e-01
M0_0 vs. M2_24h: t-test independent samples, P_val:8.903e-01 t=1.394e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Nucleus Volume'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Nucleus Volume'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Nucleus Volume'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Nucleus Volume,$\mu$m$^3$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Nucleus_Volume.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:1.524e-01 t=-1.478e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:1.954e-01 t=1.337e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:8.175e-01 t=-2.334e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:8.619e-01 t=1.761e-01
M0_0 vs. M2_6h: t-test independent samples, P_val:3.919e-01 t=-8.726e-01
M0_0 vs. M2_24h: t-test independent samples, P_val:2.988e-01 t=-1.062e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Relative Nucleus Volume'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Relative Nucleus Volume'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Relative Nucleus Volume'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set_ylim(0,80)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Relative Nucleus Volume (%)", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Nucleus_Rel_Volume.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:5.597e-04 t=3.976e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:4.185e-01 t=8.252e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:8.072e-01 t=-2.469e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:2.625e-06 t=6.362e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:9.375e-02 t=1.748e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:1.298e-01 t=1.569e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Nucleus Area '], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Nucleus Area '], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Nucleus Area '
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Nucleus Area,$\mu$m$^2$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Nucleus_Area.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:1.739e-01 t=-1.401e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:3.366e-01 t=9.835e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:6.209e-01 t=5.013e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:7.948e-01 t=-2.635e-01
M0_0 vs. M2_6h: t-test independent samples, P_val:7.741e-01 t=-2.904e-01
M0_0 vs. M2_24h: t-test independent samples, P_val:8.324e-01 t=2.140e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Relative Nucleus Area'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Relative Nucleus Area'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Relative Nucleus Area'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set_ylim(0,80)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Relative Nucleus Area (%)", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Nucleus_Rel_Area.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:3.415e-01 t=9.705e-01
M1_6h vs. M1_24h: t-test independent samples, P_val:5.246e-02 t=2.056e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:7.394e-01 t=3.367e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:1.575e-03 t=3.628e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:2.657e-02 t=2.370e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:1.830e-02 t=2.532e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Nucleus LAC'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Nucleus LAC'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Nucleus LAC'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Nucleus LAC, $\mu$m$^{-1}$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Nucleus_LAC.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:8.381e-02 t=1.804e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:2.785e-02 t=-2.363e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:6.263e-01 t=-4.935e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:4.173e-01 t=-8.274e-01
M0_0 vs. M2_6h: t-test independent samples, P_val:1.153e-01 t=1.637e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:3.022e-01 t=1.054e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Surface/Volume Nucleus Ratio'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Surface/Volume Nucleus Ratio'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Surface/Volume Nucleus Ratio'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Nucleus Area/Volume", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Nucleus_A_V.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:9.774e-01 t=-2.866e-02
M1_6h vs. M1_24h: t-test independent samples, P_val:3.734e-01 t=-9.096e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:2.513e-01 t=1.177e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:3.566e-01 t=-9.426e-01
M0_0 vs. M2_6h: t-test independent samples, P_val:6.412e-01 t=4.723e-01
M0_0 vs. M2_24h: t-test independent samples, P_val:4.124e-02 t=2.157e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Mitochondria Volume'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Mitochondria Volume'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Mitochondria Volume'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Mitochondria Volume,$\mu$m$^3$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Mitochondria_Volume.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:1.721e-05 t=5.349e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:6.221e-01 t=-5.002e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:9.874e-02 t=-1.721e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:5.089e-04 t=4.102e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:1.830e-02 t=2.540e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:7.134e-01 t=3.717e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Relative Mitochondria Volume'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Relative Mitochondria Volume'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Relative Mitochondria Volume'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set_ylim(0,0.1)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Relative Mitochondria Volume (%)", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Mitochondria_Rel_Volume.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:1.199e-05 t=5.493e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:3.586e-01 t=-9.385e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:4.211e-02 t=-2.152e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:2.045e-04 t=4.484e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:3.460e-04 t=4.195e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:1.892e-01 t=1.351e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Mitochondria Area'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Mitochondria Area'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Mitochondria Area'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Mitochondria Area,$\mu$m$^2$",fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Mitochondria_Area.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:1.095e-05 t=5.529e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:4.219e-01 t=-8.191e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:1.455e-01 t=-1.507e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:1.073e-03 t=3.790e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:3.748e-02 t=2.208e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:8.104e-01 t=2.426e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Relative Mitochondria Area'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Relative Mitochondria Area'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Relative Mitochondria Area'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set_ylim(0,1)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Relative Mitochondria Area (%)", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Mitochondria_Rel_Area.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:1.581e-05 t=5.383e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:7.895e-01 t=2.704e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:5.784e-02 t=-1.997e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:2.039e-05 t=5.460e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:4.223e-04 t=4.115e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:8.875e-02 t=1.774e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Mitochondria LAC'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Mitochondria LAC'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Mitochondria LAC'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Mitochondria LAC, $\mu$m$^{-1}$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Mitochondria_LAC.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:7.877e-01 t=2.724e-01
M1_6h vs. M1_24h: t-test independent samples, P_val:5.553e-01 t=-5.994e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:3.606e-01 t=-9.328e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:6.212e-01 t=-5.016e-01
M0_0 vs. M2_6h: t-test independent samples, P_val:4.757e-01 t=7.251e-01
M0_0 vs. M2_24h: t-test independent samples, P_val:6.108e-01 t=-5.157e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Surface/Volume Mitochondria Ratio'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Surface/Volume Mitochondria Ratio'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Surface/Volume Mitochondria Ratio'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Mitochondria Area/Volume", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Mitochondria_A_V.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:1.382e-02 t=-2.656e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:4.288e-01 t=-8.069e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:3.579e-02 t=2.230e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:5.941e-03 t=-3.060e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:6.716e-03 t=-2.979e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:5.246e-01 t=-6.457e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Endosome Volume'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Endosome Volume'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Endosome Volume'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Endosome Volume,$\mu$m$^3$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Endosome_V.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:3.444e-01 t=-9.646e-01
M1_6h vs. M1_24h: t-test independent samples, P_val:3.966e-01 t=8.654e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:8.403e-01 t=-2.038e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:7.916e-01 t=2.676e-01
M0_0 vs. M2_6h: t-test independent samples, P_val:9.300e-01 t=-8.884e-02
M0_0 vs. M2_24h: t-test independent samples, P_val:7.778e-01 t=-2.854e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Relative Endosome Volume'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Relative Endosome Volume'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Relative Endosome Volume'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Relative Endosome Volume (%)", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Endosome_Rel_V.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:4.671e-01 t=-7.389e-01
M1_6h vs. M1_24h: t-test independent samples, P_val:3.918e-01 t=8.744e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:8.461e-01 t=-1.962e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:1.599e-01 t=1.457e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:6.021e-01 t=5.286e-01
M0_0 vs. M2_24h: t-test independent samples, P_val:8.485e-01 t=1.931e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Endosome Area'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Endosome Area'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Endosome Area'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Endosome Area,$\mu$m$^2$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Endosome_A.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:5.274e-01 t=-6.413e-01
M1_6h vs. M1_24h: t-test independent samples, P_val:5.733e-01 t=5.721e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:6.074e-01 t=5.209e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:9.522e-01 t=6.064e-02
M0_0 vs. M2_6h: t-test independent samples, P_val:8.851e-01 t=-1.461e-01
M0_0 vs. M2_24h: t-test independent samples, P_val:6.428e-01 t=4.697e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Relative Endosome Area'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Relative Endosome Area'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Relative Endosome Area'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Relative Endosome Area (%)", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Endosome_Rel_A.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:9.064e-01 t=1.188e-01
M1_6h vs. M1_24h: t-test independent samples, P_val:4.721e-01 t=7.323e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:7.398e-01 t=3.362e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:9.428e-02 t=1.753e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:4.165e-01 t=8.275e-01
M0_0 vs. M2_24h: t-test independent samples, P_val:2.135e-01 t=1.278e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Endosome LAC'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Endosome LAC'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Endosome LAC'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Endosome LAC, $\mu$m$^{-1}$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Endosome_LAC.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:6.751e-02 t=1.915e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:1.096e-01 t=-1.671e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:8.016e-02 t=-1.831e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:9.897e-01 t=1.302e-02
M0_0 vs. M2_6h: t-test independent samples, P_val:1.748e-01 t=1.400e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:3.990e-01 t=-8.587e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Surface/Volume Endosome Ratio'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Surface/Volume Endosome Ratio'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Surface/Volume Endosome Ratio'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Endosome Area/Volume", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Endosome_A_to_V.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:5.090e-01 t=-6.714e-01
M1_6h vs. M1_24h: t-test independent samples, P_val:6.570e-01 t=-4.511e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:6.113e-01 t=-5.155e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:1.728e-01 t=-1.411e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:9.868e-01 t=1.679e-02
M0_0 vs. M2_24h: t-test independent samples, P_val:6.278e-01 t=-4.911e-01
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Lipid Volume'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Lipid Volume'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Lipid Volume'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Lipid droplet Volume, $\mu$m$^3$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Lipid_V.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:4.670e-05 t=-4.954e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:1.829e-02 t=2.559e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:3.123e-01 t=1.033e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:1.717e-02 t=-2.588e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:2.022e-02 t=-2.495e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:7.025e-02 t=-1.895e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Relative Endosome Volume'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Relative Endosome Volume'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Relative Lipid Volume'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Relative Lipid droplet Volume (%)", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Lipid_Rel_V.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:4.031e-03 t=-3.180e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:1.606e-01 t=1.455e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:1.912e-01 t=1.347e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:3.000e-02 t=-2.328e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:7.135e-02 t=-1.891e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:2.285e-01 t=-1.236e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Lipid Area'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Lipid Area'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Lipid Area'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Lipid droplet Area,$\mu$m$^2$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Lipid_Area.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:1.910e-06 t=-6.237e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:2.407e-03 t=3.449e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:4.330e-01 t=7.980e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:2.562e-02 t=-2.402e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:6.970e-03 t=-2.963e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:5.304e-02 t=-2.035e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Relative Lipid Area'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Relative Lipid Area'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Relative Lipid Area'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Relative Lipid droplet Area (%)", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Lipid_Rel_A.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:1.097e-03 t=-3.708e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:1.799e-02 t=2.566e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:3.437e-01 t=9.668e-01
M0_0 vs. M1_24h: t-test independent samples, P_val:1.606e-01 t=-1.454e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:5.023e-02 t=-2.066e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:2.090e-01 t=-1.291e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Lipid LAC'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Lipid LAC'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Lipid LAC'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Lipid LAC, $\mu$m$^{-1}$", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Lipid_LAC.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:1.164e-08 t=-8.457e+00
M1_6h vs. M1_24h: t-test independent samples, P_val:6.712e-02 t=1.931e+00
M2_6h vs. M2_24h: t-test independent samples, P_val:2.953e-02 t=2.321e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:1.029e-03 t=-3.807e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:1.480e-07 t=-7.433e+00
M0_0 vs. M2_24h: t-test independent samples, P_val:2.112e-03 t=-3.445e+00
plt.figure(figsize=(5,5), dpi=600)
sns.set_style("white")
sns.set_style("whitegrid")
order=["M0_0", "M1_6h", "M1_24h", "M2_6h", "M2_24h"]
ax=sns.boxplot(data=Clust, x=Clust['State'], y=Clust['Surface/Volume Lipid Ratio'], order=order, palette=my_colors)
sns.stripplot(data=Clust, x=Clust['State'], y=Clust['Surface/Volume Lipid Ratio'], order=order, size=10, linewidth=0.2, palette=my_colors)
annotator_x='State'
vol='Surface/Volume Lipid Ratio'
pairs=[("M0_0", "M1_6h"), ("M0_0", "M1_24h"), ("M0_0", "M2_6h"), ("M0_0", "M2_24h"), ("M1_6h", "M1_24h"), ("M2_6h", "M2_24h")]
# print(pairs)
annotator = Annotator(ax, pairs, data=Clust, x=annotator_x, y=vol)
annotator.configure(test='t-test_ind', text_format='star')
annotator.apply_and_annotate()
ax.set_xlabel(None)
ax.tick_params(axis='x', labelsize=12)
ax.tick_params(axis='y', labelsize=12)
ax.set(xticklabels=["M0", "M1 6h", "M1 24h", "M2a 6h", "M2a 24h"])
ax.set_ylabel("Lipid droplet Area/Volume", fontsize=18)
plt.savefig("F:\\Microglia project\\Soft X-ray tomography\\2023\\Analysis\\Graphs_all_organelles\\Lipid_A_to_V.png",dpi=600, bbox_inches='tight')
p-value annotation legend:
ns: p <= 1.00e+00
*: 1.00e-02 < p <= 5.00e-02
**: 1.00e-03 < p <= 1.00e-02
***: 1.00e-04 < p <= 1.00e-03
****: p <= 1.00e-04
M0_0 vs. M1_6h: t-test independent samples, P_val:5.201e-01 t=6.598e-01
M1_6h vs. M1_24h: t-test independent samples, P_val:6.478e-01 t=4.641e-01
M2_6h vs. M2_24h: t-test independent samples, P_val:1.892e-01 t=-1.359e+00
M0_0 vs. M1_24h: t-test independent samples, P_val:2.092e-01 t=1.352e+00
M0_0 vs. M2_6h: t-test independent samples, P_val:9.545e-01 t=5.820e-02
M0_0 vs. M2_24h: t-test independent samples, P_val:4.447e-01 t=-7.927e-01